#include<iostream>
#include<string>
using namespace std;

void Test_string1()
{
	string s1;
	string s2("hello jiayun");
	string s3 = s2;
	string s4(10, 'y');
	cout << s1 << endl;
	cout << s2 << endl;
	cout << s3 << endl;
	cout << s4 << endl;

	for (int i = 0; i < s2.size(); ++i)
	{
		cout << s2[i] << " " ;
	}
	cout << endl;

	for (auto ch : s2)
	{
		cout << ch << " ";
	}
	cout << endl;

	string::iterator it = s2.begin();
	while (it != s2.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
}

int main()
{
	Test_string1();
	return 0;
}